<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:animateLayoutChanges="true">

    <com.google.android.material.progressindicator.LinearProgressIndicator
        app:trackCornerRadius="@dimen/loading_corner_radius"
        android:id="@+id/bigProgressBar"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/big_progress_bar_margin"
        android:layout_marginEnd="@dimen/big_progress_bar_margin"
        android:indeterminate="true"
        android:visibility="visible"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        tools:visibility="gone" />

    <ScrollView
        android:id="@+id/contentScrollView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="gone"
        tools:visibility="visible">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <TextView
                android:id="@+id/markValue"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/mark_margin"
                android:layout_marginTop="@dimen/mark_margin"
                android:gravity="center"
                android:text="@string/placeholder_mark_value"
                android:textAppearance="@style/TextAppearance.Material3.DisplayLarge"
                app:layout_constraintBottom_toBottomOf="@+id/markInfoCard"
                app:layout_constraintDimensionRatio="1:1"
                app:layout_constraintEnd_toStartOf="@+id/markInfoCard"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <com.google.android.material.card.MaterialCardView
                android:id="@+id/markInfoCard"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/mark_rating_margin"
                android:layout_marginTop="@dimen/mark_rating_margin"
                android:layout_marginEnd="@dimen/mark_rating_margin"
                android:clickable="true"
                android:focusable="true"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@+id/markValue"
                app:layout_constraintTop_toTopOf="parent">

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:padding="@dimen/mark_rating_padding">

                    <TextView
                        android:id="@+id/lessonName"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/placeholder_lesson_name"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <TextView
                        android:id="@+id/workName"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/placeholder_work_type"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toBottomOf="@+id/lessonName" />

                    <TextView
                        android:id="@+id/lessonDate"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/placeholder_day"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toBottomOf="@+id/workName" />

                    <ImageView
                        android:id="@+id/arrowToLesson"
                        android:layout_width="wrap_content"
                        android:layout_height="0dp"
                        android:contentDescription="@string/goto_lesson"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintTop_toTopOf="parent"
                        app:srcCompat="@drawable/ic_round_keyboard_arrow_right_24" />
                </androidx.constraintlayout.widget.ConstraintLayout>
            </com.google.android.material.card.MaterialCardView>

            <com.google.android.material.card.MaterialCardView
                android:id="@+id/markRatingCard"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_margin="@dimen/mark_rating_margin"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="parent"
                app:layout_constraintTop_toBottomOf="@id/markInfoCard">

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/markRatingRecyclerView"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_margin="@dimen/mark_rating_padding"
                    tools:itemCount="3"
                    tools:listitem="@layout/item_mark_rating_member" />
            </com.google.android.material.card.MaterialCardView>

            <com.google.android.material.card.MaterialCardView
                android:id="@+id/avgCard"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_margin="@dimen/mark_rating_margin"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="parent"
                app:layout_constraintTop_toBottomOf="@id/markRatingCard">

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:padding="@dimen/mark_rating_padding">

                    <TextView
                        android:id="@+id/avg"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:fontFamily="sans-serif"
                        android:text="@string/placeholder_main_rating_average"
                        android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
                        app:layout_constraintBottom_toTopOf="@+id/avgDesc"
                        app:layout_constraintEnd_toStartOf="@+id/avgImportant"
                        app:layout_constraintStart_toStartOf="parent" />

                    <TextView
                        android:id="@+id/avgImportant"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/placeholder_main_rating_average"
                        android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
                        app:layout_constraintBottom_toTopOf="@+id/avgImportantDesc"
                        app:layout_constraintEnd_toStartOf="@+id/weightedAvg"
                        app:layout_constraintStart_toEndOf="@+id/avg" />

                    <TextView
                        android:id="@+id/weightedAvg"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/placeholder_main_rating_average"
                        android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
                        app:layout_constraintBottom_toTopOf="@+id/weightedAvgDesc"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toEndOf="@+id/avgImportant" />

                    <TextView
                        android:id="@+id/avgDesc"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/average_mark"
                        android:textAppearance="@style/TextAppearance.Material3.LabelSmall"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="@+id/avg"
                        app:layout_constraintStart_toStartOf="@+id/avg" />

                    <TextView
                        android:id="@+id/avgImportantDesc"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/average_important"
                        android:textAppearance="@style/TextAppearance.Material3.LabelSmall"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="@+id/avgImportant"
                        app:layout_constraintStart_toStartOf="@+id/avgImportant" />

                    <TextView
                        android:id="@+id/weightedAvgDesc"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/weighted_average"
                        android:textAppearance="@style/TextAppearance.Material3.LabelSmall"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="@+id/weightedAvg"
                        app:layout_constraintStart_toStartOf="@+id/weightedAvg" />
                </androidx.constraintlayout.widget.ConstraintLayout>
            </com.google.android.material.card.MaterialCardView>
        </androidx.constraintlayout.widget.ConstraintLayout>
    </ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>